﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Gene_Explorer_Server
{
    public partial class ImputationSettingDialog : Form
    {
        public ImputationSettingDialog()
        {
            InitializeComponent();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void radioButtonMean_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void buttonRun_Click(object sender, EventArgs e)
        {
            if (comboBoxDistanceMeasure.SelectedIndex == 2)
            {
                MinkowskiPowerDialog mkwPD = new MinkowskiPowerDialog();
                mkwPD.ShowDialog(); 
                Close();
            }
            else
            {
                GraphicPlot gP = new GraphicPlot();
                gP.ShowDialog(); 
                Close();
             }
        }

        private void comboBoxMethod_SelectedIndexChanged(object sender, EventArgs e)
        {
          /*  if (comboBoxMethod.SelectedIndex != 0)
            {
                groupBoxAverageMethod.Enabled = true;
                if (comboBoxMethod.SelectedIndex != 1 | comboBoxMethod.SelectedIndex != 2)
                {
                    groupBoxKNN.Enabled = true;
                }
            }
            */
            switch (comboBoxMethod.SelectedIndex)
            { 
                case 0:
                    groupBoxAverageMethod.Enabled = false;
                    groupBoxKNN.Enabled = false;
                    break;
                case 1:
                    groupBoxAverageMethod.Enabled = true;
                    groupBoxKNN.Enabled = false;
                    break;
                case 2:
                    groupBoxAverageMethod.Enabled = true;
                    groupBoxKNN.Enabled = false;
                    break;
                case 3:
                    groupBoxAverageMethod.Enabled = true;
                    groupBoxKNN.Enabled = true;
                    break;
                default:
                    break;
            }
        }

        private void ImputationSettingDialog_Load(object sender, EventArgs e)
        {

        }
    }
}
